package com.bajiao.mapper.account;

import com.bajiao.vo.account.AccountAdmin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bajiao.entity.account.Account;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @Description: 账户
 * @Author: FanJq
 * @Date:   2024-10-1005-11
 * @Version: V1.0
 */
public interface AccountMapper extends BaseMapper<Account> {

    /**
     * @Description
     * 单字段操作用户金额 防止脏读
     * @date 2024/6/15 17:52
     * @author FanJq
     * @param userId
     * @param money
     * @param billType
     * @return
     */
    void changeMoney(@Param("userId") String userId,
                     @Param("money") BigDecimal money,
                     @Param("billType") String billType);

    /**
     * @Description
     * 管理后台账户列表
     * @date 2025/1/2 14:13
     * @author FanJq
     * @param keywords
     * @return {@link List< AccountAdmin>}
    */
    List<AccountAdmin> getAdminList(@Param("keywords") String keywords);
}
